﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.inventory {

    public class SupplyStorage extends BaseInventory {

        protected var m_capacities:Object;

        public function SupplyStorage(_arg1:Object=null){
            var _local2:String;
            this.m_capacities = new Object();
            if (((_arg1) && (_arg1.capacities))){
                for (_local2 in _arg1.capacities) {
                    this.m_capacities[_local2] = _arg1.capacities[_local2];
                };
            };
            super(_arg1);
        }
        override public function isValidName(_arg1:String):Boolean{
            var _local2:int = this.getCapacity(_arg1);
            return ((_local2 > 0));
        }
        override public function getCapacity(_arg1:String):int{
            var _local2:int;
            if (this.m_capacities.hasOwnProperty(_arg1)){
                _local2 = this.m_capacities[_arg1];
            };
            return (_local2);
        }
        public function setCapacity(_arg1:String, _arg2:int):void{
            if ((((_arg2 == 0)) && (this.m_capacities.hasOwnProperty(_arg1)))){
                delete this.m_capacities[_arg1];
            } else {
                this.m_capacities[_arg1] = _arg2;
            };
        }
        public function setCapacities(_arg1:Object):void{
            this.m_capacities = _arg1;
        }

    }
}//package Classes.inventory 
